Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solved Testimonial alignment issue #3509 #3510

Conversation

reck-coder123
Copy link

@reck-coder123 reck-coder123 commented Dec 22, 2024

Description
fixes #3509
This pr fixes the alignment issue in the testimonial section of the website.
Before the pr
image

After the pr
image

  • ...
  • ...
  • ...

Related issue(s)

Summary by CodeRabbit

  • New Features
    • Adjusted layout styles for testimonials on the homepage, improving visual alignment.
  • Bug Fixes
    • Removed unnecessary CSS class from the Testimonial component, enhancing layout behavior on medium-sized screens.

Copy link

coderabbitai bot commented Dec 22, 2024

Caution

Review failed

The pull request is closed.

Walkthrough

The pull request addresses a testimonial alignment issue on the AsyncAPI website by modifying CSS classes in the Testimonial component and the homepage index file. The changes involve adjusting padding and removing a flex-related class to improve the visual consistency of testimonial layouts, specifically focusing on resolving spacing discrepancies for Eric Horesnyi's testimonial.

Changes

File Change Summary
pages/[lang]/index.tsx Updated className for Bill Doerrfeld and Eric Horesnyi testimonials from md:pl-10 lg:pl-16 to md:pr-10 lg:pr-16
components/Testimonial.tsx Removed md:flex-1 class from the testimonial text container div

Assessment against linked issues

Objective Addressed Explanation
Resolve testimonial alignment issue [#3509]
Ensure consistent spacing between testimonial text and image

Possibly related PRs

Suggested labels

ready-to-merge

Suggested reviewers

  • derberg
  • magicmatatjahu
  • devilkiller-ag
  • akshatnema
  • sambhavgupta0705
  • asyncapi-bot-eve
  • Mayaleeeee
  • anshgoyalevil

Poem

🐰 Hop, hop, testimonials align!
Padding shifts with design's design
From left to right, the text now flows
Consistency blooms, as layout grows
A rabbit's touch, pixel-perfect line! 🌈


📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 83ae59b and 0f7c66a.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (2)
  • components/Testimonial.tsx (1 hunks)
  • pages/[lang]/index.tsx (2 hunks)

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Welcome to AsyncAPI. Thanks a lot for creating your first pull request. Please check out our contributors guide useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.

Copy link

netlify bot commented Dec 22, 2024

Deploy Preview for asyncapi-website failed.

Built without sensitive environment variables

Name Link
🔨 Latest commit f38652f
🔍 Latest deploy log https://app.netlify.com/sites/asyncapi-website/deploys/67687adc4b79910008af03ab

Copy link

netlify bot commented Dec 22, 2024

Deploy Preview for asyncapi-website ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 0f7c66a
🔍 Latest deploy log https://app.netlify.com/sites/asyncapi-website/deploys/676943cc84fbad0008d03e12
😎 Deploy Preview https://deploy-preview-3510--asyncapi-website.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

codecov bot commented Dec 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.59%. Comparing base (3afcf6a) to head (0f7c66a).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3510   +/-   ##
=======================================
  Coverage   86.59%   86.59%           
=======================================
  Files          21       21           
  Lines         664      664           
=======================================
  Hits          575      575           
  Misses         89       89           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@asyncapi-bot
Copy link
Contributor

asyncapi-bot commented Dec 22, 2024

We require all PRs to follow Conventional Commits specification.
More details 👇🏼

 No release type found in pull request title "Solved Testimonial alignment issue #3509". Add a prefix to indicate what kind of release this pull request corresponds to. For reference, see https://www.conventionalcommits.org/

Available types:
 - feat: A new feature
 - fix: A bug fix
 - docs: Documentation only changes
 - style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
 - refactor: A code change that neither fixes a bug nor adds a feature
 - perf: A code change that improves performance
 - test: Adding missing tests or correcting existing tests
 - build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
 - ci: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
 - chore: Other changes that don't modify src or test files
 - revert: Reverts a previous commit

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2327eae and 83ae59b.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (2)
  • package.json (1 hunks)
  • pages/[lang]/index.tsx (1 hunks)
🔇 Additional comments (1)
pages/[lang]/index.tsx (1)

221-221: Verify layout impact

Let's verify if this change affects the overall testimonial grid layout.

✅ Verification successful

Let me gather more specific information about the testimonial layout by examining the component and its usage.


Layout change is consistent with the design pattern

The padding change in the testimonial is part of a consistent grid layout where:

  • Testimonials are arranged in a 2-column grid on medium screens (md:grid-cols-2)
  • Left column testimonials use md:pr-10 lg:pr-16
  • Right column testimonials use md:pl-10 lg:pl-16
  • The last testimonial (in question) has additional bottom padding (md:pb-48 lg:pb-44) which is intentional as it's the final element
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Search for other testimonial implementations to ensure consistency

# Look for other testimonial components or similar grid layouts
echo "Testimonial component usage:"
rg -l 'Testimonial'

# Look for similar grid patterns
echo -e "\nSimilar grid patterns:"
rg -B 2 -A 2 'md:grid-cols-2'

Length of output: 1796


Script:

#!/bin/bash
# Check the Testimonial component implementation and its usage
echo "Testimonial component implementation:"
cat components/Testimonial.tsx

echo -e "\nTestimonial usage in index page:"
rg -B 3 -A 3 '<Testimonial' pages/[lang]/index.tsx

Length of output: 4226

package.json Outdated
@@ -82,7 +82,7 @@
"markdown-to-txt": "^2.0.1",
"markdown-toc": "^1.2.0",
"md5": "^2.3.0",
"mermaid": "9.3.0",
"mermaid": "^11.4.1",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

⚠️ Potential issue

Based on the initial search results, I can now provide a final assessment:

Major version update requires dedicated PR and testing

From the initial scan, we found:

  • Mermaid is extensively used across 40+ documentation files
  • There's a central configuration in components/MDX/MDX.tsx that initializes mermaid with specific settings
  • The update spans two major versions (9 to 11) which typically include breaking changes

Recommendations:

  1. Create a separate PR for the mermaid upgrade
  2. Test all documentation pages that contain diagrams (see file list from scan)
  3. Pay special attention to the configuration in components/MDX/MDX.tsx as it may need updates
  4. Review the mermaid changelog for breaking changes between v9 and v11
🔗 Analysis chain

Unrelated dependency update detected

This PR's objective is to fix testimonial alignment, but includes a major version update of the mermaid package (9.3.0 to ^11.4.1). Major version updates often include breaking changes and should be handled in a separate PR.

Let's check for potential breaking changes:

Recommendations:

  1. Move this dependency update to a separate PR focused on the mermaid upgrade
  2. Test all diagrams with the new version before merging
  3. Review the mermaid changelog for breaking changes between v9 and v11

Let me gather more information about the specific mermaid diagrams in use to better assess the impact.

mermaid' markdown/

Check package-lock.json for the current version

echo -e "\nCurrent mermaid version in package-lock.json:"
rg '"mermaid":' package-lock.json


This will help us understand what types of diagrams are being used and confirm the current version before making a final assessment about the impact of the upgrade.

---

mermaid' markdown/

# Look for specific mermaid diagram types
echo -e "\nSpecific diagram types:"
rg -A 1 'graph [TDLR]|sequenceDiagram|classDiagram|stateDiagram|gantt|pie|flowchart' markdown/

# Check package-lock.json for version info
echo -e "\nMermaid version in package-lock.json:"
rg -A 3 '"mermaid":\s*{' package-lock.json

mermaid[\s\S]+?```" markdown/

Check current mermaid version

echo -e "\nCurrent mermaid version:"
grep -A 1 '"mermaid":' package-lock.json


</details>

<details>
<summary>🏁 Scripts executed</summary>

The following scripts were executed for the analysis:

Script:

```shell
#!/bin/bash
# Description: Search for mermaid usage in the codebase
# This will help assess the impact of the major version update

# Find files containing mermaid
echo "Files potentially using mermaid:"
rg -l 'mermaid'

# Look for mermaid configuration
echo -e "\nMermaid configuration:"
rg -A 5 'mermaid.*config|mermaid.*init'

Length of output: 2391


Script:

#!/bin/bash
# Search for mermaid diagram syntax in markdown files
echo "Mermaid diagram types in use:"
rg -B 1 -A 1 '

Length of output: 185


Script:

#!/bin/bash
# Search for mermaid diagram syntax in markdown files
echo "Mermaid diagram types in use:"
rg -B 1 -A 1 '

Length of output: 185


Script:

#!/bin/bash
# Search for mermaid codeblocks in markdown files
echo "Mermaid diagrams in use:"
rg -p "

Length of output: 175

@@ -218,7 +218,7 @@ export default function HomePage() {
authorDescription='Sr. Architect, Office of the CTO at Solace'
/>
<Testimonial
className='md:pl-10 lg:pl-16'
className='md:pl-10 md:pb-48 lg:pl-16 lg:pb-44'
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Review padding values and approach

The added padding values (md:pb-48 = 12rem, lg:pb-44 = 11rem) seem unusually large for bottom spacing. This might indicate:

  1. A potential underlying layout issue that should be addressed differently
  2. Inconsistent treatment of testimonials, as only one testimonial is modified

Consider these alternatives:

  1. Investigate why this specific testimonial needs extra padding
  2. Apply consistent padding to all testimonials using a shared class
  3. Use grid or flexbox properties to ensure equal height testimonials
-              className='md:pl-10 md:pb-48 lg:pl-16 lg:pb-44'
+              className='md:pl-10 lg:pl-16'

Then, add this CSS to your stylesheet:

.testimonials-grid {
  @apply grid gap-6 md:grid-cols-2;
  grid-auto-rows: 1fr; /* This ensures equal height */
}

And update the parent ul element:

-          <ul className='mx-auto max-w-screen-xl md:grid md:grid-cols-2 md:px-6 lg:px-8'>
+          <ul className='testimonials-grid mx-auto max-w-screen-xl md:px-6 lg:px-8'>

@asyncapi-bot
Copy link
Contributor

asyncapi-bot commented Dec 23, 2024

⚡️ Lighthouse report for the changes in this PR:

Category Score
🔴 Performance 31
🟢 Accessibility 98
🟢 Best practices 92
🟢 SEO 100
🔴 PWA 33

Lighthouse ran on https://deploy-preview-3510--asyncapi-website.netlify.app/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Testimonial Alignment Issue on AsyncAPI Website
2 participants